#CROSS_COMPILE = arm-linux-gnueabihf-
CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
LD := $(CROSS_COMPILE)ld
AR := $(CROSS_COMPILE)ar

# CFLAGS += -fPIC 

OBJS := enpin.o serial_test.o

# SO : $(OBJS)
# 	$(CC) $(CFLAGS) -shared $^ -o libspi.so
# 	$(CC) demo.c -o demo -L./ -lspi
%o : %c 
	$(CC) -I ./ -c -o $@ $< 

all : $(OBJS)
	$(CC) $^ -I ./ -o rs485_test

install:
	cp -rvf ./*.h ./lib
	cp -rvf ./*.so ./lib

clean:
	rm *.o *.so -f

